﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace BackupRestore.BackupRestoreFramework
{
    /// <summary>
    /// Performs the analysis of the backup:
    /// Finds out how many files will be backed up
    /// The sum of the size of the files being backed up
    /// The size of the archive that the backup will be stored in.
    /// </summary>
    class PreBackupAnalyzer
    {
        private BackupSpecification Specification;
        private static string _className;

        public PreBackupAnalyzer(BackupSpecification Specification)
        {
            _className = MethodBase.GetCurrentMethod().DeclaringType.Name;
            this.Specification = Specification;
        }


        /// <summary>
        /// Performs the analysis:
        /// Finds out how many files will be backed up
        /// The sum of the size of the files being backed up
        /// The size of the archive that the backup will be stored in.
        /// </summary>
        public void Analyze()
        {
            string _methodName = MethodBase.GetCurrentMethod().Name;

            Logger.Logger.LogMethodEntry(_className, _methodName);

            Logger.Logger.LogDebug(_className, _methodName, "Starting pre backup analysis");
            Logger.Logger.LogDebug(_className, _methodName, "Backup Spec:\r\n" + Specification.ToString());

            Logger.Logger.LogMethodExit(_className, _methodName);     
        }


    }
}
